home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 36 / Amiga Format CD36 (1999-01-22)(Future Publishing)(GB)[!][issue 1999-02].iso / -seriously_amiga- / comms / other / amipopup / install < prev    next >
Text File  |  1998-11-25  |  16KB  |  524 lines

  1. ; $VER: AMIPopUp Install V1.4 (16.11.98) - written by Sascha "SieGeL" Pfalz
  2. ; Installer and Installer project icon
  3. ; (c) Copyright 1985-98 Amiga International Inc.  All Rights Reserved.
  4. ;
  5. ; For best view set TAB to 2
  6. ;
  7. ; This script follows the rules for the Installer, all text vars have a 
  8. ; t_ preceeding the var name, all other vars have the # in front of the
  9. ; names and all sub procedures (if any) will start with P_ .
  10. ;
  11. ; V1.0 (24.06.98) - Initial Version, Script is able to update or full install
  12. ; V1.1 (11.08.98) - Fixed the OS Check to check ONLY for Kick V3.x systems
  13. ; V1.2 (08.10.98) - Added spanish texts written by Dámaso D. Estévez, thanks!
  14. ; V1.3 (12.10.98) - Script now checks language, if unknown uses english...
  15. ; V1.4 (16.11.98) - Added Checks & Installation of MUI sub-classes
  16.  
  17. ;===================
  18. ;= Check-Variables =
  19. ;===================
  20.  
  21. (set #MUI "MUI")
  22. (set #MUIMASTER_VMIN 11)
  23. (set #MUIMASTER_PATH "MUI:Libs/muimaster.library")
  24. (set #AMIPOPUP "AMIPopUp")
  25. (set #AMIGUIDE "AMIPopUp.guide")
  26. (set #AMIGUIDE_GER "AMIPopUp_ger.guide")
  27. (set #AMIHIST  "AMIPopUp.history")
  28. (set #PREPHIST "PrepMail.history")
  29. (set #AMICATDE "catalogs/deutsch/AMIPopUp.catalog")
  30. (set #AMICATSW "catalogs/svenska/AMIPopUp.catalog")
  31. (set #AMICATSP "catalogs/español/AMIPopUp.catalog")
  32. (set #AMICATPO "catalogs/polski/AMIPopUp.catalog")
  33. (set #PREPMAIL "PrepMail")
  34. (set #INFOTEXT "MUI:Libs/MUI/InfoText.mcc")
  35. (set #TEXTINPUT "MUI:Libs/MUI/TextInput.mcc")
  36.  
  37. ; First check if a supported language could be found, if not use english
  38.  
  39. (IF (AND (<> @language "deutsch") (<> @language "español")) (set @language "english"))
  40.  
  41.  
  42. ;================
  43. ;= GERMAN TEXTS =
  44. ;================
  45.  
  46. (IF (= @language "deutsch")
  47.     (
  48.     (set default_lang 2)
  49.  
  50.     (set t_StartMsg            (cat        "\nInstallations-Skript für AMIPopUp & PrepMail\n\n"
  51.                                                             "Dieses Skript installiert AMIPopUp und alle relevanten\n"
  52.                                                             "Dateien auf Ihrem System.\n\n"
  53.                                                             "AMIPopUp ist © 1998 by Sascha 'SieGeL' Pfalz\n"
  54.                                                             "MUI ist © 1993-98 by Stefan Stuntz\n\n"
  55.                                                             "InfoText.mcc by Benny Kjær Nielsen\n"
  56.                                                             "TextInput.mcc by Oliver Wagner"))
  57.     (set t_bad-kick            (cat        "\nSie benötigen mindestens AmigaOS V3.0 oder\n\n"
  58.                                                             "höher, um AMIPopUp zu benutzen !\n\n"
  59.                                                             "-> Bitte updaten Sie Ihr System <-"))
  60.     (set t_wrong_mui        (cat        "Falsche MuiMaster.library Version!\n\n"
  61.                                                             "Installiert ist V%ld.%ld, benötigt wird aber mind. V11 !\n\n"
  62.                                                             "Bitte updaten Sie Ihr MUI System auf V3.6+\n(Library-Version 11+) !"))
  63.     (set t_no_mui                (cat        "Konnte MUI nicht finden !\n"
  64.                                                             "User-Editor benötigt unbedingt MUI V3.6+ um zu arbeiten !\n\n"
  65.                                                             "Bitte erst das MUI System installieren (es lohnt sich) und\n"
  66.                                                             "dann diese Installation nochmal beginnen !"))
  67.     (set t_AskForDest                        "Bitte Ziel-Pfad für %s angeben:")
  68.     (set t_copyfile                            "Kopiere jetzt %s...")
  69.     (set t_selectlocale    (cat        "Bitte Sprache(n) zum Installieren/Updaten auswählen:\n"
  70.                                                             "(Alle Kataloge werden nach PROGDIR:Catalogs/ kopiert)"))
  71.     (set t_askfordocs                        "Dokumentation installieren/updaten ?")
  72.     (set t_selectdocs                        "Bitte auswählen, welche Teile der Dokumentation installiert/geupdated werden sollen:")
  73.     (set t_askforddest                    "Bitte Zielverzeichnis für die Dokumentation auswählen:")
  74.     (set t_copycatalog                    "Kopiere Katalog Datei...")
  75.     (set t_askdocshelp    (cat        "Wenn Sie wünschen kann der Installer die mitgelieferten\n"
  76.                                                             "Dokumentationen installieren. Sie haben dann die Möglichkeit,"
  77.                                                             "ein Verzeichnis für die Doks anzugeben."))
  78.     (set t_lastnotice        (cat        "\nInstallation erfolgreich.\n\n"
  79.                                                             "Bitte lesen Sie UNBEDINGT die Hinweise in der Dokumentation "
  80.                                                             "nach, wie PrepMail in Ihre smb.conf Datei eingetragen werden muss!!!\n\n"))
  81.     ))
  82.  
  83. ;=================
  84. ;= SPANISH TEXTS =
  85. ;=================
  86.  
  87. ; by Dámaso D. Estévez <amidde@arrakis.es>
  88.  
  89. (IF (= @language "español")
  90.     (
  91.     (set default_lang 8)
  92.  
  93.     (set t_StartMsg     (cat            "\nGuión instalador de AMIPopUp y PrepMail\n\n"
  94.                                                             "Este guión instalará AMIPopUp y todos los ficheros\n"
  95.                                                             "necesarios en su sistema.\n\n"
  96.                                                             "AMIPopUp es © 1998 de Sascha 'SieGeL' Pfalz\n"
  97.                                                             "MUI es © 1993-98 de Stefan Stuntz\n\n"
  98.                                                             "InfoText.mcc es Benny Kjær Nielsen\n"
  99.                                                             "TextInput.mcc es Oliver Wagner"))
  100.     (set t_bad-kick            (cat        "\n\n¡¡Debe de disponer del SO 3.0 o superior\n\n"
  101.                                                             "para poder utilizar AMIPopUp!!\n\n"
  102.                                                             "-> ¡Por favor, actualice su sistema! <-"))
  103.     (set t_wrong_mui        (cat        "¡Versión de la biblioteca\n"
  104.                                                             "'MuiMaster.library' incorrecta!\n\n"
  105.                                                             "¡Se encuentra instalada la versión %ld.%ld,\n"
  106.                                                             "requiriéndose al menos la versión 11!\n\n"
  107.                                                             "Por favor actualice su sistema MUI a la\n"
  108.                                                             "versión 3.6 o superior que incluirá\n"
  109.                                                             "la versión 11 o superior de dicha biblioteca!"))
  110.     (set t_no_mui                (cat        "¡Imposible encontrar el sistema MUI!\n"
  111.                                                             "¡AMIPopUp requiere MUI 3.6+ para funcionar!\n"
  112.                                                             "Por favor, instale en primer lugar el sistema MUI\n"
  113.                                                             "y reinicie este guión instalador después\n"
  114.                                                             "de haber realizado la tarea anterior."))
  115.     (set t_AskForDest                        "Especifique destino para %s:")
  116.     (set t_copyfile                            "Copiando fichero %s...")
  117.     (set t_selectlocale    (cat        "Por favor, elija el/los idioma/s a instalar/actualizar:\n"
  118.                                                             "(el inglés es interno; los demás catálogos serán copiados en PROGDIR:Catalogs/)."))
  119.     (set t_askfordocs                        "¿Desea instalar/actualizar la documentación?")
  120.     (set t_selectdocs                        "Por favor, elija qué partes de la documentación deben de ser instaladas/actualizadas:")
  121.     (set t_askforddest                    "Elija el directorio de destino para la documentación:")
  122.     (set t_copycatalog                    "Copiando catálogo...")
  123.     (set t_askdocshelp    (cat        "Le permite que  la documentación suministrada\n"
  124.                                                             "sea copiada en el directorio de su elección."))
  125.     (set t_lastnotice        (cat        "\nInstalación realizada con éxito.\n\n"
  126.                                                             "Por favor, ¡¡¡asegúrese de que lee\n"
  127.                                                             "la documentación sobre la adición de\n"
  128.                                                             "PrepMail a su fichero smb.cnf!!!\n\n"))
  129.     ))
  130.  
  131. ;=================
  132. ;= ENGLISH TEXTS =
  133. ;=================
  134.  
  135. (IF (= @language "english")
  136.     (
  137.     (set default_lang 4)
  138.  
  139.     (set t_StartMsg     (cat            "\nInstallation Script of AMIPopUp & PrepMail\n\n"
  140.                                                             "This script will install AMIPopUp and all required\n"
  141.                                                             "files to your System.\n\n"
  142.                                                             "AMIPopUp is © 1998 by Sascha 'SieGeL' Pfalz\n"
  143.                                                             "MUI is © 1993-98 by Stefan Stuntz\n\n"
  144.                                                             "InfoText.mcc by Benny Kjær Nielsen\n"
  145.                                                             "TextInput.mcc by Oliver Wagner"))
  146.     (set t_bad-kick            (cat        "\n\nYou must be using AmigaOS V3.0 or higher\n\n"
  147.                                                             "to use AMIPopUp !\n\n"
  148.                                                             "-> Please update your machine ! <-"))
  149.     (set t_wrong_mui        (cat        "Wrong MuiMaster.library Version !\n\n"
  150.                                                             "Installed is V%ld.%ld, required is at least V11 !\n\n"
  151.                                                             "Please update your MUI System to at least V3.6+\nLibrary-Version 11+) !"))
  152.     (set t_no_mui                (cat        "Unable to find MUI System !\n"
  153.                                                             "AMIPopUp requires MUI V3.6+ to work !\n"
  154.                                                             "Please install first the MUI System and restart this Installation\n"
  155.                                                             "after the MUI system is installed."))
  156.     (set t_AskForDest                        "Specify destination for %s:")
  157.     (set t_copyfile                            "Now copying file %s...")
  158.     (set t_selectlocale    (cat        "Please choose language(s) to install/update:\n"
  159.                                                             "(English is built-in, all other catalogs will be copied to PROGDIR:Catalogs/"))
  160.     (set t_askfordocs                        "Do you wish to install/update the documentation ?")
  161.     (set t_selectdocs                        "Please choose which parts of the documentation should be installed/updated:")
  162.     (set t_askforddest                    "Select Destination directory for the documentation:")
  163.     (set t_copycatalog                    "Copy catalog file...")
  164.     (set t_askdocshelp    (cat        "If you wish Installer will copy the supplied docs in a\n"
  165.                                                             "directory of your choice."))
  166.     (set t_lastnotice        (cat        "\nInstallation successful.\n\n"
  167.                                                             "Please make sure that you read the docs about adding PrepMail "
  168.                                                             "to your smb.conf file !!!\n\n"))
  169.  
  170.     ))
  171.  
  172. ;****************************************************************************
  173. ;***                  MAIN INSTALLATION SCRIPT STARTS HERE !              ***
  174. ;****************************************************************************
  175.  
  176. (set #osver (/ (getversion) 65536))                ; Determine OS Version...
  177. (if (< #osver 39) ( (ABORT t_bad-kick)))    ; ...and stop if OS < 37
  178. (complete 0)
  179. (message t_StartMsg)
  180. (complete 1)
  181. (welcome)
  182.  
  183. ;======================================================================
  184. ;= FIRST SYSTEM-CHECKS TO DETERMINE USED AMIGA AND INSTALLED SOFTWARE =
  185. ;======================================================================
  186.  
  187. (set #MUI_ASSIGN (getassign #MUI))                ; Check if MUI exists!
  188.  
  189. (if (<> #MUI_ASSIGN "")
  190.     (
  191.     (set #muiver (/ (getversion #MUIMASTER_PATH) 65536))     ; Get Version
  192.     (set #muirev (* (getversion #MUIMASTER_PATH) 65536))    ; ???
  193.     (set #muirev (/ #muirev 65536))                                                ; Get Revision
  194.     (if (< #muiver #MUIMASTER_VMIN) (ABORT (t_wrong_mui #muiver #muirev)))
  195.     (complete 6)
  196.     )
  197.     (
  198.     (abort t_no_mui)
  199.     ))
  200.  
  201.  
  202. ;======================================================================
  203. ;=       PROMPT FOR THE DESTINATION DIRECTORY & COPY MAIN FILE        =
  204. ;======================================================================
  205.  
  206. (if (<> 0 (exists #AMIPOPUP))
  207.     (
  208.  
  209.     (set #mypath "")
  210.  
  211.     (until (<> #mypath "")
  212.         (
  213.         (set #mypath
  214.             (askdir (prompt (t_AskForDest #AMIPOPUP))
  215.                             (default "MUI:")
  216.                             (help @askdir-help)))
  217.         ))
  218.     (complete 12)
  219.  
  220.     (set @default-dest #mypath)
  221.  
  222.  
  223.     (copylib     (prompt (t_copyfile #AMIPOPUP))
  224.                         (source "AMIPopUp")
  225.                         (dest        @default-dest)
  226.                         (confirm)
  227.                         (help    @copylib-help)
  228.                         (infos))
  229.     )
  230.     (
  231.     (set @default-dest "MUI:")
  232.     )
  233. )
  234. (complete 20)
  235.  
  236. ;======================================================================
  237. ;=              CHECK FOR PREPMAIL AND INSTALL IT, TOO                =
  238. ;======================================================================
  239.  
  240. (if (<> 0 (exists #PREPMAIL))
  241.     (
  242.  
  243.     (set #preppath "")
  244.  
  245.     (until (<> #preppath "")
  246.         (
  247.         (set #preppath
  248.             (askdir (prompt (t_AskForDest #PREPMAIL))
  249.                             (default "AmiTCP:bin")
  250.                             (help @askdir-help)))
  251.         ))
  252.  
  253.     (complete 22)
  254.  
  255.     (copylib     (prompt (t_copyfile #PREPMAIL))
  256.                         (source "PrepMail")
  257.                         (dest        #preppath)
  258.                         (confirm)
  259.                         (help    @copylib-help))
  260. ))        
  261.  
  262. ;======================================================================
  263. ;=                      INSTALL LOCALE CATALOGS                       =
  264. ;======================================================================
  265.  
  266. (set #def 0)    ; Init var
  267.  
  268. (if (<> 0 (exists #AMICATDE))    
  269.     (
  270.     (set #choice1 "pdeutsch")
  271.     (if (= @language "deutsch") (set #def (+ #def 1)))
  272.     )
  273.     (
  274.     (set #choice1 "p")
  275.     ))
  276.  
  277. (if (<> 0 (exists #AMICATSW))    
  278.     (
  279.     (set #choice2 "svenska")
  280.     (if (= @language "svenska") (set #def (+ #def 2)))
  281.     )
  282.     (
  283.     (set #choice2 "")
  284.     ))
  285.  
  286. (if (<> 0 (exists #AMICATSP))    
  287.     (
  288.     (set #choice3 "español")
  289.     (if (= @language "español") (set #def (+ #def 4)))
  290.     )
  291.     (
  292.     (set #choice3 "")
  293.     ))
  294.  
  295. (if (<> 0 (exists #AMICATPO))    
  296.     (
  297.     (set #choice4 "polish")
  298.     (if (= @language "polish") (set #def (+ #def 8)))
  299.     )
  300.     (
  301.     (set #choice4 "")
  302.     ))
  303.  
  304.  
  305. (set #catalogs
  306.     (askoptions    (prompt t_selectlocale)
  307.                             (help @askoptions-help)
  308.                             (choices    #choice1
  309.                                                 #choice2
  310.                                                 #choice3
  311.                                                 #choice4)
  312.                             (default #def)))
  313.  
  314. (complete 30)
  315.  
  316. (if (IN #catalogs 0) 
  317.     (
  318.     (set #mkpath (tackon @default-dest "catalogs/deutsch"))
  319.     (makedir #mkpath)
  320.     (copylib       (prompt t_copycatalog)
  321.                             (source "catalogs/deutsch/AMIPopUp.catalog")
  322.                             (dest     #mkpath)
  323.                             (help @copyfiles-help))))
  324.  
  325. (complete 40)
  326.  
  327. (if (IN #catalogs 1) 
  328.     (
  329.     (set #mkpath (tackon @default-dest "catalogs/svenska"))
  330.     (makedir #mkpath)
  331.     (copylib       (prompt t_copycatalog)
  332.                             (source "catalogs/svenska/AMIPopUp.catalog")
  333.                             (dest     #mkpath)
  334.                             (help @copyfiles-help))))
  335.  
  336. (if (IN #catalogs 2) 
  337.     (
  338.     (set #mkpath (tackon @default-dest "catalogs/español"))
  339.     (makedir #mkpath)
  340.     (copylib       (prompt t_copycatalog)
  341.                             (source "catalogs/español/AMIPopUp.catalog")
  342.                             (dest     #mkpath)
  343.                             (help @copyfiles-help))))
  344.  
  345. (if (IN #catalogs 3) 
  346.     (
  347.     (set #mkpath (tackon @default-dest "catalogs/polski"))
  348.     (makedir #mkpath)
  349.     (copylib       (prompt t_copycatalog)
  350.                             (source "catalogs/polski/AMIPopUp.catalog")
  351.                             (dest     #mkpath)
  352.                             (help @copyfiles-help))))
  353.  
  354.  
  355.  
  356.  
  357. ;======================================================================
  358. ;=        INSTALL AMIGA-GUIDE DOCUMENTATION & HISTORY FILE            =
  359. ;======================================================================
  360.  
  361. (complete 55)
  362.  
  363. (set #myguide (exists #AMIGUIDE))
  364. (set #myhist (exists #AMIHIST))
  365. (set #mygerguide (exists #AMIGUIDE_GER))
  366. (set #myprephist (exists #PREPHIST))
  367.  
  368. (set #docdef 0)
  369.  
  370. (if (OR (<> 0 #myguide) (<> 0 #myhist) (<> 0 #mygerguide) (<> 0 #myprephist))
  371.     (
  372.     (if (= 1 (AskBool    (prompt t_askfordocs)    (help    t_askdocshelp)))
  373.         (
  374.  
  375.         (if (<> 0 #myguide) 
  376.             (              
  377.             (set #selguide "AmigaGuide Manual - English (23kb)")
  378.             (set #docdef (+ #docdef 1))
  379.             )
  380.             (
  381.             (set #selguide "")
  382.             )
  383.         )
  384.  
  385.         (if (<> 0 #mygerguide) 
  386.             (
  387.             (set #selgerguide "AmigaGuide Manual - Deutsch (25kb)")
  388.             (set #docdef (+ #docdef 2))
  389.             )
  390.             (
  391.             (set #selgerguide "")
  392.             )
  393.         )
  394.  
  395.  
  396.         (if (<> 0 #myhist)     
  397.             (            
  398.             (set #selhis "AMIPopUp.History            ( 6kb)")
  399.             (set #docdef (+ #docdef 4))
  400.             )
  401.             (
  402.             (set #selhis "")
  403.             )
  404.         )
  405.  
  406.         (if (<> 0 #myprephist)     
  407.             (            
  408.             (set #prephis "PrepMail.History            ( 2kb)")
  409.             (set #docdef (+ #docdef 8))
  410.             )
  411.             (
  412.             (set #prephis "")
  413.             )
  414.         )
  415.  
  416.         (complete 60)
  417.  
  418.  
  419.         (set #docparts
  420.             (askoptions (prompt        t_selectdocs)
  421.                                     (help            @askoptions-help)
  422.                                     (choices #selguide
  423.                                                      #selgerguide
  424.                                                    #selhis
  425.                                                      #prephis)
  426.                                     (default #docdef)))
  427.         (complete 70)
  428.  
  429.         (if (<> 0 #docparts)
  430.             (
  431.             (set #docdest
  432.                 (askdir (prompt     t_askforddest)
  433.                                 (help            @askdir-help)
  434.                                 (default    @default-dest)))
  435.  
  436.             (complete 75)
  437.  
  438.             (if (<> "" #docdest)
  439.                 (
  440.                 (if (IN #docparts 0)
  441.                     (
  442.                     (copyfiles     (prompt "Install AmigaGuide...")
  443.                                             (help        @copyfiles-help)
  444.                                             (source    "AMIPopUp.guide")
  445.                                             (dest        #docdest)
  446.                                             (infos))
  447.  
  448.                     (complete 85)
  449.  
  450.                     ))
  451.  
  452.                 (if (IN #docparts 1)
  453.                     (
  454.                     (copyfiles     (prompt "Install AmigaGuide...")
  455.                                             (help        @copyfiles-help)
  456.                                             (source    "AMIPopUp_ger.guide")
  457.                                             (dest        #docdest)
  458.                                             (infos))
  459.  
  460.                     (complete 90)
  461.  
  462.                     ))
  463.  
  464.                 (if (IN #docparts 2)
  465.                     (
  466.                     (copyfiles     (prompt "Install History...")
  467.                                             (help        @copyfiles-help)
  468.                                             (source    "AMIPopUp.history")
  469.                                             (dest        #docdest)
  470.                                             (infos))
  471.                     ))
  472.  
  473.                 (if (IN #docparts 3)
  474.                     (
  475.                     (copyfiles     (prompt "Install History...")
  476.                                             (help        @copyfiles-help)
  477.                                             (source    "PrepMail.history")
  478.                                             (dest        #docdest)
  479.                                             (infos))
  480.  
  481.  
  482.                     ))
  483.                 ))
  484.             ))
  485.         ))
  486.     ))
  487.  
  488. ;======================================================================
  489. ;=        CHECK FOR TextInput.mcc AND InfoText.mcc SUBCLASSES         =
  490. ;======================================================================
  491.  
  492. (complete 95)
  493.  
  494. (if (= 0 (exists #INFOTEXT))
  495.     (
  496.     (copyfiles     (prompt "Install InfoText.mcc ...")
  497.                             (help        @copyfiles-help)
  498.                             (source "subclasses/InfoText.mcc")
  499.                             (dest        "MUI:Libs/MUI/"))
  500.     ))
  501.  
  502. (complete 96)
  503.  
  504. (if (= 0 (exists #TEXTINPUT))
  505.     (
  506.     (copyfiles     (prompt     "Install TextInput#?.mcc ...")
  507.                             (help         @copyfiles-help)
  508.               (source  "SubClasses/")
  509.                             (pattern "TextInput#?")
  510.                             (dest         "MUI:Libs/MUI/"))
  511.     ))
  512.  
  513.  
  514. ;======================================================================
  515. ;=    END OF INSTALLATION - NOTICE USER ABOUT SMB.CONF ADDING !!!     =
  516. ;======================================================================
  517.  
  518. (complete 99)
  519.  
  520. (message t_lastnotice)
  521.  
  522. (complete 100)
  523. (exit)
  524.